import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wan_android_flutter/modules/main/home/home_page.dart';
import 'package:wan_android_flutter/modules/main/knowledge_system/knowledge_system_page.dart';

import '../../generated/locales.g.dart';

class MainState {
  MainState();

  /// 主页面Scaffold widget key
  final scaffoldKey = GlobalKey<ScaffoldState>();

  /// 是否展示drawer
  RxBool isShowingDrawer = false.obs;

  /// 当前选中的tab
  RxInt currentTabIndex = 0.obs;

  /// TAB 标题
  late final List<String> tabLocalKeyList = [
    LocaleKeys.home.tr,
    LocaleKeys.knowledge_system.tr,
  ];

  /// 页面数据
  late final List<Widget> childrenWidgetList = [
    HomePage(),
    KnowledgeSystemPage(),
  ];
}
